import axios from "../http";
import Qs from "qs";
import base from "@/request/base";

/**
 * post方法，对应post请求
 * @desc注册请求
 * @param {String} url [请求的url地址]
 * @param {Object} params [请求时携带的参数]
 */
//发生次数请求方法（可用于 发生次数图表[发生]:2 [未发生]:30）
export function happenTimesChart(data) {
    return axios({
        url: `${base.url}/happenTimeChart`,
        method: 'post',
        data: Qs.stringify(data)
    })
}

//能量饼状图请求方法
export function happenEnergyChart(data) {
    return axios({
        url: `${base.url}/happenEnergyChart`,
        method: 'post',
        data: Qs.stringify(data)
    })
}

//破坏程度请求方法
export function happenFailureModeChart(data) {
    return axios({
        url: `${base.url}/happenFailureModeChart`,
        method: 'post',
        data: Qs.stringify(data)
    })
}
